/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity.state.book;

import entity.Book;
import entity.User;

/**
 *
 * @author andreas
 */
public class AvailableState implements BookState {

    public AvailableState() {
    }

    @Override
    public String toString() {
        return "available";
    }

    public void lendBook(Book b, User user) {
        b.setLentTo(user);
        b.setState(new LentState());
    }

    public void returnBook(Book b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void reserve(Book b, User user) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void cancelReservation(Book b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
